﻿// -----------------------------------------------------------------------
// Copyright (c) David Kean. All rights reserved.
// -----------------------------------------------------------------------
extern alias pcl;
using System;
using Moq;

using pcl::System.Adaptation;

namespace Portable
{
    internal class IAdapterResolverFactory
    {
        public static IAdapterResolver OverrideResolve(Func<Type, object> action)
        {
            var mock = new Mock<IAdapterResolver>();
            mock.Setup(a => a.Resolve(It.IsAny<Type>()))
                             .Returns(action);

            return mock.Object;
        }
    }
}
